package com.example.sofa_module;

import com.example.sofa_module.detail.AddComEntity;
import com.example.sofa_module.detail.CommentEntity;
import com.example.sofa_module.detail.DelComEntity;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApiService {
    @GET("feeds/queryHotFeedsList?feedId=0&pageCount=10&userId=0")
    Observable<SofaFeedEntity> requestSofaData(
//            @Query("feedId")int feedId,
//                                               @Query("feedType")String feedType,
//                                               @Query("pageCount")int pageCount,
//                                               @Query("userId")int userId
    );
    @GET("comment/queryFeedComments")
     Observable<CommentEntity> requestDetailComment(@Query("id") int id,
                                                    @Query("itemId")long itemId,
                                                    @Query("pageCount")int pageCount,
                                                    @Query("userId")long userId);

    @FormUrlEncoded
    @POST("comment/addComment")
    Observable<AddComEntity> requestAddComment(@Field("commentText") String commentText,
                                               @Field("height")Integer height,
                                               @Field("image_url")String  image_url,
                                               @Field("itemId")Integer itemId,
                                               @Field("userId")Integer userId,
                                               @Field("video_url")String video_url,
                                               @Field("width")Integer width);


    @GET("comment/deleteComment")
    Observable<DelComEntity> requestDelComment(@Query("commentId") long commentId,
                                               @Query("itemId")long itemId,
                                               @Query("userId")long userId);
}
